﻿Imports System.Data.OleDb
Public Class hotelinformation1
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim oleDbConn As New OleDb.OleDbConnection(ConfigurationManager.ConnectionStrings("ConnectionString7").ConnectionString)
        Dim SqlString As String = "Insert into Comments(Author,Comment,Title,Hotel_fxid) Values (@f1,@f2,@f3,@f4)"
        Dim cmd As OleDbCommand = New OleDbCommand(SqlString, oleDbConn)
        cmd.CommandType = CommandType.Text
        cmd.Parameters.AddWithValue("@f1", fld_author.Text)
        cmd.Parameters.AddWithValue("@f2", fld_comment.Text)
        cmd.Parameters.AddWithValue("@f3", fld_title.Text)
        cmd.Parameters.AddWithValue("@f4", Request.Params("ID"))
        oleDbConn.Open()
        cmd.ExecuteNonQuery()
        Response.Redirect("confirmation2.aspx")
    End Sub
End Class